package Text1;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Properties;
import java.util.zip.DataFormatException;

/*
 *@Student 张策
 */
public class Text1 {
    public static void main(String[] args) throws IOException, ClassNotFoundException, InstantiationException, IllegalAccessException, NoSuchMethodException, InvocationTargetException {
        Properties properties = new Properties();
        properties.load(new FileInputStream("src\\re.properties"));
        String classfullpath = properties.get("classfullpath").toString();
        String methodName = properties.get("method").toString();
        System.out.println(classfullpath);
        System.out.println(methodName);
        Class cls=Class.forName(classfullpath);
        Object object = cls.newInstance();
        System.out.println(object.getClass());
        Method method1 = cls.getMethod(methodName);
        method1.invoke(object);
    }
}
